
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module algorithms.primary.quicksort</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="algorithms.html"><font color="#ffffff">algorithms</font></a>.<a href="algorithms.primary.html"><font color="#ffffff">primary</font></a>.quicksort</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///C:/python27/lib/5625_6313/algorithms/primary/quicksort.py">c:\python27\lib\5625_6313\algorithms\primary\quicksort.py</a></font></td></tr></table>
    <p><tt>#&nbsp;-*-&nbsp;coding:&nbsp;utf-8&nbsp;-*-</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="algorithms.primary.quicksort.html#QuickSort">QuickSort</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="QuickSort">class <strong>QuickSort</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Algoritmo&nbsp;<a href="#QuickSort">QuickSort</a><br>
Parâmetro&nbsp;de&nbsp;entrada:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A:&nbsp;Lista&nbsp;a&nbsp;ser&nbsp;ordenada<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="QuickSort-__init__"><strong>__init__</strong></a>(self, A)</dt></dl>

<dl><dt><a name="QuickSort-partition"><strong>partition</strong></a>(self, p, r)</dt><dd><tt>Método&nbsp;que&nbsp;separa&nbsp;a&nbsp;lista&nbsp;em&nbsp;duas&nbsp;tabelas&nbsp;a&nbsp;partir&nbsp;de&nbsp;um&nbsp;pivot,&nbsp;o&nbsp;pivot&nbsp;neste&nbsp;caso&nbsp;é&nbsp;o&nbsp;ultimo&nbsp;elemento&nbsp;da&nbsp;lista.<br>
A&nbsp;tabela&nbsp;esquerda&nbsp;tem&nbsp;os&nbsp;valores&nbsp;mais&nbsp;baixos&nbsp;que&nbsp;o&nbsp;pivot,&nbsp;enquanto&nbsp;que&nbsp;a&nbsp;direita&nbsp;tem&nbsp;valores&nbsp;mais&nbsp;altos&nbsp;que&nbsp;o&nbsp;pivot.</tt></dd></dl>

<dl><dt><a name="QuickSort-sort"><strong>sort</strong></a>(self, p, r)</dt><dd><tt>Método&nbsp;para&nbsp;ordenar&nbsp;as&nbsp;partições&nbsp;criadas&nbsp;a&nbsp;partir&nbsp;da&nbsp;lista</tt></dd></dl>

</td></tr></table></td></tr></table>
</body></html>